package com.example.sale.Controller;


import com.example.sale.Result.R;
import com.example.sale.Service.IUserService;
import com.example.sale.True.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("test")
public class TestController {
    @Autowired
    private IUserService iUserService;

//    @GetMapping("/getAll")
//    public String getAll(){
//        return "hello";
//    }

    @GetMapping("/getAll")
    public List<User> getAll(){
        return  iUserService.list();
    }
}
